package com;

import com.controller.Ioc;
import com.model.User;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;

//@ComponentScan("com.controller")
@SpringBootApplication
public class ExampleApplication {

    public static void main(String[] args) {
        SpringApplication.run(ExampleApplication.class, args);

//        ApplicationContext context= SpringApplication.run(ExampleApplication.class, args);
//        Ioc ioc=context.getBean(Ioc.class);
//
//        Ioc ioc1=context.getBean("ioc", Ioc.class);
//Ioc ioc2=(Ioc) context.getBean("ioc");
//        System.out.println(ioc);
//        System.out.println(ioc1);
//        System.out.println(ioc2);

//        ioc.sayHi();

//        User user=context.getBean(User.class);
//User user1=context.getBean("admin",User.class);
//User user2=(User) context.getBean("zhangsan");
//User user3=(User) context.getBean("lisi");
//User user4=(User) context.getBean("wangwu");
//
//        System.out.println(user);
//        System.out.println(user1);
//        System.out.println(user2);
//        System.out.println(user3);
//        System.out.println(user4);

    }

}
